package com.gitee.swsk33.demoentity.dataobject;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 订单类
 */
@Data
@Table("order")
@JsonIgnoreProperties(value = "userId", allowSetters = true)
public class Order {

	/**
	 * 主键id
	 */
	@Id(keyType = KeyType.Auto)
	private Integer id;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 关联的用户id（冗余字段，外键）
	 */
	private Integer userId;

	/**
	 * 创建时间
	 */
	private LocalDateTime gmtCreated;

	/**
	 * 关联的用户
	 */
	private User user;

}